package com.buddy.summary.code.stream;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class ListStream {
    public static void main(String[] args) {
        List<String> list = Arrays.asList("abc","","bc","efg","abd","","jkl");
        List<String> filteredList = list.stream().filter(string ->!"".equalsIgnoreCase(string)).collect(Collectors.toList());
//        filteredList.forEach(System.out::println);
        List<String> newList = filteredList.stream().map((x) ->{
           return x.replace("a","1");
        }).collect(Collectors.toList());
        newList.forEach(System.out::println);
    }
}
